<template>
  <view class="no-data">
    <image
      src="/static/images/common/noData.png"
      :style="'width:' + width + ';height:' + height + ';'"
      class="img"
    ></image>
    <view class="title">{{ title }}</view>
    <slot></slot>
  </view>
</template>

<script setup lang="ts">
defineProps({
  title: {
    type: String,
    default: "暂无数据~",
  },
  width: {
    type: String,
    default: "420rpx",
  },
  height: {
    type: String,
    default: "290rpx",
  },
});
</script>

<style lang="scss" scoped>
.no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  .img {
    margin-bottom: 24rpx;
  }
  .title {
    font-size: 28rpx;
    font-weight: 400;
    color: #999999;
    line-height: 40rpx;
    margin-bottom: 60rpx;
  }
}
</style>
